﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BO;

namespace Site_CamaraTibau
{
    public partial class RegimeInterno : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    onload();
                }
            }
            catch (Exception)
            {
                
                throw;
            }
        }


        #region Contexto
        ModeloContainer bco = new ModeloContainer();
        #endregion

        public void onload()
        {
            try
            {

                var obj = bco.RegimentoInternoes.FirstOrDefault(x => x.id == x.id);

                if (obj != null)
                {
                    if (!string.IsNullOrEmpty(obj.URL))
                    {
                        lbkRegimentoInterno.HRef = "~/Regimento/" + obj.URL;
                        lbkRegimentoInterno.Visible = true;
                        lbkRegimentoInterno.InnerText = obj.Descricao.Trim();
                    }
                }


            }

            catch (Exception )
            {
                throw;
            }

        }
    }
}